import { requestClient } from '#/api/request';


//新增
export async function addWhiteLinkApi(data: any) {
  return requestClient.post('/certification/create-certified-white', data);
}

// 编辑
export async function editWhiteLinkApi(data: any) {
  return requestClient.patch('/certification/edit-certified-white', data);
}

//未添加名单查询 
export async function getNotCertifiedWhiteApi(params: any) {
  return requestClient.get('/certification/not-certified-white', { params });

}

//个人未添加名单查询 
export async function getPersionNotCertifiedWhiteApi(params: any) {
  return requestClient.get('/certification/unjoined', { params });

}

//查询 
export async function getCertifiedWhiteApi(params: any) {
  return requestClient.get('/certification/get-certified-white', { params });
}

//查询详情
export async function getCertifiedWhiteDetailApi(params: any) {
  return requestClient.get('/certification/get-certified-white-detail', { params });
}

// 查询证书许可
export async function askCertifiedWhiteDetailApi(params: any) {
  return requestClient.get('/certification/check-certified', { params });
}

// 编辑证书
export async function updateCertifiedWhiteDetailApi(data: any) {
  return requestClient.patch('/certification/update-certified-white', data);
}


//删除
export async function delCertifiedWhiteApi(params: { id: string }) {
  return requestClient.delete(`/certification/delete-certified-white/${params.id}`);
}

//获取白名单验证
export async function getCheckWhiteApi(params: { certifiedId?: string }) {
  return requestClient.get(`/certification/check-white`, { params });
}
